﻿@model DriveBabyDrive.Models.ChangePasswordModel

@{
    ViewBag.Title = "Change Password";
}

@section Header {
    <div class="ui-grid-b" style="padding:1%">
	    <div class="ui-block-a">@Html.ActionLink("Back", "Index/", "Home", null, new { data_icon = "arrow-l", data_role="button"})</div>
	    <div class="ui-block-b"  style="text-align:center">@Html.ActionLink("Home", "Index/", "Home", null, new { data_icon = "home", data_iconpos="notext", data_role="button"})</div>
	    <div class="ui-block-c" style="text-align:right"> @Html.Partial("_LogOnPartial")</div>
    </div>
}

<p>
    New passwords are required to be a minimum of @Membership.MinRequiredPasswordLength characters in length.
</p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Password change was unsuccessful. Please correct the errors and try again.")

    <ul data-role="listview" data-inset="true">
        <li data-role="list-divider">Account information</li>

        <li data-role="fieldcontain">
            @Html.LabelFor(m => m.OldPassword)
            @Html.PasswordFor(m => m.OldPassword)
            @Html.ValidationMessageFor(m => m.OldPassword)
        </li>

        <li data-role="fieldcontain">
            @Html.LabelFor(m => m.NewPassword)
            @Html.PasswordFor(m => m.NewPassword)
            @Html.ValidationMessageFor(m => m.NewPassword)
        </li>

        <li data-role="fieldcontain">
            @Html.LabelFor(m => m.ConfirmPassword)
            @Html.PasswordFor(m => m.ConfirmPassword)
            @Html.ValidationMessageFor(m => m.ConfirmPassword)
        </li>

        <li data-role="fieldcontain">
            <input type="submit" value="Change Password" />
        </li>
    </ul>        
}
